package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.Blog;
import com.example.demo.model.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserService {

    @Resource
    private UserMapper userMapper;

    public User selectByName(String username) {
        return userMapper.selectByName(username);
    }

    public void addNewUser(User user) {
        userMapper.addNewUser(user);
    }

        public User selectById(Integer userId) {
        return userMapper.selectById(userId);
    }
}
